#!/bin/sh

# Tag files with PKGVERID
[ -d "$INSTALLDIR" ] || exit 1
[ -n "$PKGVERID" ] || exit 1

for x in `find "$INSTALLDIR" -type f`; do
    grep -q __MULTIPKG_BUILD_VERSION__ "$x" && sed -i -e "s,__MULTIPKG_BUILD_VERSION__,$PKGVERID," "$x"
    grep -q __MULTIPKG_CONFIG_DIR__  "$x" && sed -i -e "s,__MULTIPKG_CONFIG_DIR__,$PREFIX/usr/share/multipkg," "$x"
done

exit 0
